﻿using System;
using System.Collections.Generic;

    class CheckNumb
    {
        static void CheckNumbIfBiggerThanItsNaghbours(int[] arr, int index)
        {
            bool isBigger = true;
           
                if (arr[index] > arr[index + 1] && arr[index] > arr[index - 1])
                {
                    isBigger = true;
                    Console.WriteLine("The number on the position {0} is bigger than its neghbours -> {1}", index, isBigger);
                }
                else
                {
                    isBigger = false;
                    Console.WriteLine("The number on the position {0} is bigger than its neghbours -> {1}", index, isBigger);
                }
            
        }
        static void Main(string[] args)
        {
            int[] arr = { 1, 2, 3, 2, 3 };
            int index = 3;
            CheckNumbIfBiggerThanItsNaghbours(arr, index);
        }
    }

